//
//  DoodadList.m
//  MapEdit
//
//  Created by Steven Canfield on 7/6/07.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import "DoodadList.h"


@implementation DoodadList
- (id)initWithData:(NSData *)data {
	self = [super init];
	if( self ) {
		doodadCount = [data length] / sizeof( chk_dd2_t );
		doodads = malloc( sizeof( chk_dd2_t ) * doodadCount );
		[data getBytes:doodads range:NSMakeRange( 0, [data length])];
	}
	return self;
}


- (NSString *)description {
	return [NSString stringWithFormat:@"DoodadList contains %i units", doodadCount];
}

@end
